<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="java.util.List" %>
<%@ page import="oneroom.user.zip.zipModel" %>
<jsp:useBean id="dao" scope="page" class="oneroom.user.zip.zipcode" />
<%
	String roomkind = request.getParameter("roomkind") == null ? "" : request.getParameter("roomkind");
	String charter = request.getParameter("charter") == null ? "" : request.getParameter("charter");
	String zip_code3 = request.getParameter("zip_code3") == null ? "" : request.getParameter("zip_code3");
	String zipdong = request.getParameter("dong") == null ? "" : request.getParameter("dong");
	String[] dongs = zipdong.split(",");
	
	List dong = dao.getDong(zip_code3,roomkind,charter);
%>
<table width="600px;" border="0" cellspacing="0" cellpadding="0">
<tr>
<%
for(int i = 0; i<dong.size(); i++){ 
	zipModel mod = (zipModel)dong.get(i);
	String checked = "";
	for(int j =0; j<dongs.length; j++){
		if(dongs[j].equals(mod.getZip_code4())){checked =" checked='checked' ";} 
	}
%>
<td style="width:90px;"><input name="dong" type="checkbox" value="<%=mod.getZip_code4()%>" <%=checked %> /><%=mod.getZip_code4()%><span class="c_org">(<%=mod.getCnt()%>)</span></td>
<%if(((i+1)%5) == 0 && i > 0) {%>
</tr><tr>
<%} %>
<%}%>
</tr>
</table>